package com.tencreat.domain.mall.dto;

import com.fasterxml.jackson.annotation.JsonFormat;
import com.tencreat.common.enums.UserType;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;

import javax.validation.constraints.NotNull;
import java.math.BigDecimal;
import java.time.LocalDate;
import java.util.List;

/**
 * 购物车下单
 * @author zixin
 */
@Data
public class MallCartPlaceDTO {

    @ApiModelProperty(value = "购物车ID集合",required = true)
    @NotNull(message = "下单商品不能为空")
    private List<CartPlacePr> cartPlaces;

    @ApiModelProperty("收获地址ID")
    @NotNull(message = "收获地址不能为空")
    private Long addressId;

    public static class CartPlacePr {

        @ApiModelProperty(value = "购物车ID",required = true)
        @NotNull(message = "购物车ID不能为空")
        private Long id;

        @ApiModelProperty("备注")
        private String remark;

        public void setId(Long id) {
            this.id = id;
        }
        public Long getId() {
            return id;
        }
        public void setRemark(String remark) {
            this.remark = remark;
        }
        public String getRemark() {
            return remark;
        }
    }

//    @ApiModelProperty("用户级别")
//    private UserType userLevel;

//    @ApiModelProperty(value = "优惠券ID")
//    private Integer voucherId;

    @ApiModelProperty(value = "商品总价")
    private BigDecimal priceTotal;

//
//    @ApiModelProperty(value = "自提地址ID")
//    private long selfmentionId;

    @ApiModelProperty(value = "电话")
    private String phone;

    @ApiModelProperty(value = "用户昵称")
    private String name;

//    @ApiModelProperty(value = "自提时间")
//    @JsonFormat(shape = JsonFormat.Shape.STRING, pattern = "yyyy-MM-dd" )
//    private LocalDate selfMentionTime;


}
